﻿using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Xml.Serialization;

namespace Bookworm.Core
{
    [GeneratedCode("xsd", "2.0.50727.42")]
    [Serializable]
    [DebuggerStepThrough]
    [DesignerCategory("code")]
    [XmlType(AnonymousType = true)]
    [XmlRoot(Namespace = "", IsNullable = false, ElementName = "ebook")]
    public partial class EbookInfoXml
    {
        private string titleField;

        private string[] subtitlesField;

        private string descriptionField;

        private ebookAuthor[] authorsField;

        private string[] categoriesField;

        private string[] tagsField;

        private ebookLink[] linksField;

        private ebookImage[] imagesField;

        private string formatField;

        private int ratingField;

        private string isbn10Field;

        private string isbn13Field;

        private string publisherField;

        private DateTime publishdateField;

        private bool publishdateFieldSpecified;

        private string languageField;

        private int pagecountField;

        private bool pagecountFieldSpecified;

        public EbookInfoXml()
        {
            ratingField = 3;
            languageField = "en-us";
        }

        public string title
        {
            get { return titleField; }
            set { titleField = value; }
        }

        [XmlArray("sub-titles")]
        [XmlArrayItem("sub-title", IsNullable = false)]
        public string[] subtitles
        {
            get { return subtitlesField; }
            set { subtitlesField = value; }
        }

        [XmlElement(IsNullable = true)]
        public string description
        {
            get { return descriptionField; }
            set { descriptionField = value; }
        }

        [XmlArrayItem("author", IsNullable = false)]
        public ebookAuthor[] authors
        {
            get { return authorsField; }
            set { authorsField = value; }
        }

        [XmlArrayItem("category", IsNullable = false)]
        public string[] categories
        {
            get { return categoriesField; }
            set { categoriesField = value; }
        }

        [XmlArrayItem("tag", IsNullable = false)]
        public string[] tags
        {
            get { return tagsField; }
            set { tagsField = value; }
        }

        [XmlArrayItem("link", IsNullable = false)]
        public ebookLink[] links
        {
            get { return linksField; }
            set { linksField = value; }
        }

        [XmlArrayItem("image", IsNullable = false)]
        public ebookImage[] images
        {
            get { return imagesField; }
            set { imagesField = value; }
        }

        [XmlAttribute]
        public string format
        {
            get { return formatField; }
            set { formatField = value; }
        }

        [XmlAttribute]
        [DefaultValue(3)]
        public int rating
        {
            get { return ratingField; }
            set { ratingField = value; }
        }

        [XmlAttribute]
        public string isbn10
        {
            get { return isbn10Field; }
            set { isbn10Field = value; }
        }

        [XmlAttribute]
        public string isbn13
        {
            get { return isbn13Field; }
            set { isbn13Field = value; }
        }

        [XmlAttribute]
        public string publisher
        {
            get { return publisherField; }
            set { publisherField = value; }
        }

        [XmlAttribute("publish-date", DataType = "date")]
        public DateTime publishdate
        {
            get { return publishdateField; }
            set { publishdateField = value; }
        }

        [XmlIgnore]
        public bool publishdateSpecified
        {
            get { return publishdateFieldSpecified; }
            set { publishdateFieldSpecified = value; }
        }

        [XmlAttribute]
        [DefaultValue("en-us")]
        public string language
        {
            get { return languageField; }
            set { languageField = value; }
        }

        [XmlAttribute("page-count")]
        public int pagecount
        {
            get { return pagecountField; }
            set { pagecountField = value; }
        }

        [XmlIgnore]
        public bool pagecountSpecified
        {
            get { return pagecountFieldSpecified; }
            set { pagecountFieldSpecified = value; }
        }
    }

    [GeneratedCode("xsd", "2.0.50727.42")]
    [Serializable]
    [DebuggerStepThrough]
    [DesignerCategory("code")]
    [XmlType(AnonymousType = true)]
    public partial class ebookAuthor
    {
        private string typeField;

        private string descriptionField;

        private string valueField;

        public ebookAuthor()
        {
            this.typeField = "Primary";
        }

        [XmlAttribute]
        [DefaultValue("Primary")]
        public string type
        {
            get { return this.typeField; }
            set { this.typeField = value; }
        }

        [XmlAttribute]
        public string description
        {
            get { return this.descriptionField; }
            set { this.descriptionField = value; }
        }

        [XmlText]
        public string Value
        {
            get { return valueField; }
            set { valueField = value; }
        }
    }

    [GeneratedCode("xsd", "2.0.50727.42")]
    [Serializable]
    [DebuggerStepThrough]
    [DesignerCategory("code")]
    [XmlType(AnonymousType = true)]
    public partial class ebookLink
    {
        private string typeField;

        private string descriptionField;

        private string valueField;

        public ebookLink()
        {
            typeField = "Other";
        }

        [XmlAttribute]
        [DefaultValue("Other")]
        public string type
        {
            get { return typeField; }
            set { typeField = value; }
        }

        [XmlAttribute]
        public string description
        {
            get { return descriptionField; }
            set { descriptionField = value; }
        }

        [XmlText]
        public string Value
        {
            get { return valueField; }
            set { valueField = value; }
        }
    }

    [GeneratedCode("xsd", "2.0.50727.42")]
    [Serializable]
    [DebuggerStepThrough]
    [DesignerCategory("code")]
    [XmlType(AnonymousType = true)]
    public partial class ebookImage
    {
        private string typeField;

        private int heightField;

        private bool heightFieldSpecified;

        private int widthField;

        private bool widthFieldSpecified;

        private string valueField;

        public ebookImage()
        {
            typeField = "Front";
        }

        [XmlAttribute]
        [DefaultValue("Front")]
        public string type
        {
            get { return typeField; }
            set { typeField = value; }
        }

        [XmlAttribute]
        public int height
        {
            get { return heightField; }
            set { heightField = value; }
        }

        [XmlIgnore]
        public bool heightSpecified
        {
            get { return heightFieldSpecified; }
            set { heightFieldSpecified = value; }
        }

        [XmlAttribute]
        public int width
        {
            get { return widthField; }
            set { widthField = value; }
        }

        [XmlIgnore]
        public bool widthSpecified
        {
            get { return widthFieldSpecified; }
            set { widthFieldSpecified = value; }
        }

        [XmlText]
        public string Value
        {
            get { return valueField; }
            set { valueField = value; }
        }
    }
}